<script setup lang="ts">
const props = defineProps<{
  orderInfo?: any;
}>();
const record = props.orderInfo;
</script>

<template>
  <div>
    <a-space align="center" direction="vertical">
      <a-space v-if="record.amount">
        <a-tag :color="record.amount > 0 ? 'red' : 'green'">
          {{ record.amount > 0 ? '盈' : '亏' }}
        </a-tag>
        <span
          :style="record.amount > 0 ? 'color: green' : 'color: red'"
          class="text-xl"
        >
          ¥ {{ record.amount }}
        </span>
      </a-space>
      <template
        v-if="record.dyOrderStatus === 2 && record.promiseRecommendEndShipTime"
      >
        <a-statistic-countdown
          :value="record.promiseRecommendEndShipTime * 1000"
          format="HH:mm:ss"
          title="承诺时效"
        />
      </template>
    </a-space>
  </div>
</template>
